<%--
  Created by IntelliJ IDEA.
  User: mi
  Date: 2018/10/1
  Time: 20:06
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: mi
  Date: 2018/9/29
  Time: 20:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="${basePath}/public/css/adminbase.css">
    <link href="${basePath}/public/js/webuploader.css" rel="stylesheet">
    <script type="text/javascript" src="${basePath}/public/js/jquery.min.js"></script>
    <script type="text/javascript" src="${basePath}/public/js/webuploader.min.js"></script>

    <script type="text/javascript">

        function button() {
            var name = $("#name").val();
            var remark = $("#remark").val();

            $.ajax({
                url:"${basePath}/admin/GoodsProduct/Add",
                type:"post",
                data:{
                    name:name,
                    remark:remark
                },
                success:function (resultJson) {
                    if (resultJson.status==1){
                        window.location.href="${basePath}/admin/adminUser/work/index";
                    } else {
                        alert(resultJson.msg);
                    }
                }
            })
        }
    </script>
</head>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">新增</a></li>
    </ul>
</div>

<div class="session-main">
    <div class="formbody">
        <ul class="forminfo">
            <li><label>类型名称</label><input name="" type="text" class="dfinput" value="" id="name"><i>名称不能超过30个字符</i></li>
            <li><label>商品描述</label><input name="" type="text" class="dfinput" value="" id="remark" ></li>
            <li>
                <label>&nbsp;</label>
                <input name="" type="button" class="btn" value="确认保存" onclick="button()">
                <input type="button" class="btn" onclick="javascript:window.location.href='index.html'" value="返回" style=" background: #57e980;">
            </li>
        </ul>

    </div>
</div>
</body>
</html>

